package com.neusoft.elmboot.mapper;

import com.neusoft.elmboot.po.Review;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ReviewMapper {
    @Insert("insert into review (businessId, userId, content) values (#{businessId}, #{userId}, #{content})")
    public int insertReview(Review review);

    @Delete("delete from review where businessId = #{businessId} and userId = #{userId}")
    public int deleteReview(Review review);
    @Update("update review set content = #{content} where businessId = #{businessId} and userId = #{userId}")
    public int updateReview(Review review);
    @Select("select * from review where businessId = #{businessId}")
    public List<Review> selectReview(Integer businessId);
}
